package com.cbh.feign.controller.user;



import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.user.User;

public interface ExteUserControllerBase {
	
	/**
	 * 添加代理公司管理员
	 * @param phoneNumber
	 * @param password
	 * @param validation
	 * @return
	 * @throws Exception
	 */

	@RequestMapping(value = "/exte/v1/app/user/addUser", method = RequestMethod.POST)
	public ApiResult<User> addUser(
			 @RequestParam(value = "userPhoneNumber", required = true) String userPhoneNumber,
			 @RequestParam(value = "userPassword", required = true) String userPassword,
			@RequestParam(value = "verification", required = true) String validation,
		    @RequestParam(value = "orgID", required = false) String orgID,
		    @RequestParam(value = "angenceID", required = true) String angenceID);

	/**
	 * 注册
	 * 
	 * @param phoneNumber
	 * @param password
	 * @param validation
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/exte/v1/app/user/register", method = RequestMethod.POST)
	public ApiResult<User> registered(@RequestParam(value = "userPhoneNumber", required = true) String userPhoneNumber,
			@RequestParam(value = "userPassword", required = true) String userPassword,
			@RequestParam(value = "verification", required = true) String validation,
			@RequestParam(value = "orgID", required = false) String orgID,
			@RequestParam(value = "spreadUserId", required = false) String spreadUserId);

	/**
	 * 发送验证码
	 * 
	 * @param phoneNumber
	 * @param modleid
	 * @return
	 */
	@RequestMapping(value = "/exte/v1/app/user/sendSMSValidat", method = RequestMethod.POST)
	public ApiResult<Boolean> sendSMSValidation(
			@RequestParam(value = "phoneNumber", required = true) String phoneNumber,
			@RequestParam(value = "modleid", required = true) String modleid);

	@RequestMapping(value = "/exte/v1/app/user/webH5LoginByphone", method = RequestMethod.POST)
	public ApiResult<String> webH5LoginByphone(@RequestParam(value = "userPhone", required = true) String userPhone,
			@RequestParam(value = "imeiType", required = true) String imeiType);

	@RequestMapping(value = "/exte/v1/app/user/webH5Login", method = RequestMethod.POST)
	public ApiResult<String> webH5Login(@RequestParam(value = "userPhone", required = true) String userPhone,
			@RequestParam(value = "validation", required = true) String validation,
			@RequestParam(value = "orgId", required = false) String orgId,
			@RequestParam(value = "imeiType", required = true) String imeiType);

	/**
	 * 登录
	 * 
	 * @param duAccount
	 *            账号
	 * @param password
	 *            密码
	 * @param
	 * @return
	 */
	@RequestMapping(value = "/exte/v1/app/user/login", method = RequestMethod.POST)
	public ApiResult<User> theLogin(@RequestParam(value = "userAccount", required = true) String userAccount,
			@RequestParam(value = "userPassword", required = true) String userPassword,
			@RequestParam(value = "imei", required = true) String imei,
			@RequestParam(value = "imeiType", required = true) String imeiType);

	/**
	 * 根据手机号加密码进行修改密码操作
	 * 
	 * @param accountToken
	 * @param phoneNumber
	 * @param password
	 * @param newPpassword
	 * @return
	 */
	@RequestMapping(value = "/exte/v1/app/user/editByPhoneAndPwd", method = RequestMethod.POST)
	public ApiResult<User> editByPhoneAndPwd(@RequestParam(value = "userAccount", required = true) String userAccount,
			@RequestParam(value = "password", required = true) String password,
			@RequestParam(value = "newPpassword", required = true) String newPpassword);

	/**
	 * 
	 * 
	 * @param phoneNumber
	 * @param modleid
	 * @return
	 */
	@RequestMapping(value = "/exte/v1/app/user/getTokenByaccount", method = RequestMethod.GET)
	public ApiResult<String> getTokenByaccount(@RequestParam(value = "account", required = true) String account);

	/**
	 * 
	 * 
	 * @param phoneNumber
	 * @param modleid
	 * @return
	 */
	@RequestMapping(value = "/exte/v1/app/user/sss", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> ss(@RequestBody User user);

}
